Users continually request faster and faster processing speeds. This implies either faster hardware or faster program execution speed. Generally, designing and manufacturing faster hardware is expensive, so processing methods have been devised to speed up the execution speed of programs running on existing hardware. One of these methods was the development of threads.
Digital processing utilizes a sequence of program instructions to perform operations of in the processor. A sequential process has a single flow control, a sequence of instructions executed by the process. In a multithreaded process, there are multiple schedulable flows of control called threads. Threads are associated with a sequence of instructions and are often referred to as threads of execution. Threads support the notion of concurrent programming and are used to exploit the inherent hardware parallelism of many computer architectures. By splitting a problem into smaller pieces, a thread can run each piece concurrently.
Traditionally, applications were split into multiple processes, and some form of interprocess communications (IPC) was used to communicate between the processes. A multithreaded process has more than one thread of control sharing both address space and resources. Using threads eliminates the need for IPC and reduces context-switching overhead. Threads are also referred to as lightweight processes (LWPs), since the context maintained for threads is much lighter than for processes. Even though threads are schedulable entities, it does not necessarily mean that they run in parallel. Threads can be scheduled concurrently on multiple processors, while on uniprocessor machines, threads can be time-sliced.
The creation of threads places an important role in processor performance. There is a tradeoff between creating multiple threads to increase effective processor throughput and the overhead associated with thread creation itself.